import time

print(time.time())  #  秒数(secs)   second  --> 1000 毫秒 --》微秒 --》 纳秒
# print(time.time_ns())

# time.sleep(2)    休息2秒程序继续运行

#  时间戳 float

timestamp1 = time.time()
struct_time1 = time.localtime(timestamp1)
print(struct_time1)
print(struct_time1)
print(struct_time1[0])
timestamp2 = time.mktime(struct_time1)
print(timestamp2)
str1 = time.strftime('%Y_%m_%d',struct_time1)
print(str1)
struct_time3 = time.strptime('2019_06_26','%Y_%m_%d')
print(struct_time3)
t= time.gmtime()
t= time.localtime()
print(t)
